/*******************************************************************************
*  file    : myproxymodel.hpp
*  created : 04.09.2013
*  author  :
*******************************************************************************/

#ifndef MYPROXYMODEL_HPP
#define MYPROXYMODEL_HPP

#include <QSortFilterProxyModel>

class DeviceProxyModel : public QSortFilterProxyModel
{
    Q_OBJECT
public:
    enum class Sortings
    {
        Sort_AZ,
        Sort_SMS_Date,
        Sort_Bat,
        Sort_Color,
        Sort_Bat_Change
    };

public:
    explicit DeviceProxyModel(QObject *parent = 0);
public slots:
    void sortAZ     ();
    void sortSmsDate();
    void sortBat    ();
    void sortColor  ();
    void sortBatChange();

protected:
    bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
private:
    Sortings sorting_;
};

#endif // MYPROXYMODEL_HPP
